package com.example.day01;

import android.view.View;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;

import java.util.List;

public class VideoAdapter extends BaseQuickAdapter<VideoEntity.DataBean, BaseViewHolder> {
    public VideoAdapter(int layoutResId, List<VideoEntity.DataBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder holder, VideoEntity.DataBean bean) {
        holder.setText(R.id.tv,bean.getCaption());
        ImageView view = holder.findView(R.id.iv);
        Glide.with(getContext()).load(bean.getVideomainimg()).into(view);
    }
}
